//
//  DuoAccessoryManager.h
//  duosample
//
//  Created by Lin Xu for Discovery Bay Games on 4/4/12.
//  Copyright (c) 2012 Discovery Bay Games. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "input/duo/DuoAccessoryDevice.h"

@interface DuoAccessoryManager : NSObject {
    NSMutableDictionary* _aliveDevices;
    NSMutableDictionary* _registeredTypes;
}

- (void) addAccessoryAddedObserver:(id)target selector:(SEL)selector;
- (void) addAccessoryRemovedObserver:(id)target selector:(SEL)selector;
- (void) removeAccessoryObserver:(id)target;

- (void) showAccessoryPicker;

- (void) start;
- (void) stop;

- (void) registerProtocol:(NSString*)protocol withBlock:(DuoAccessoryDevice*(^)()) block;
- (NSEnumerator*) accessories;

+ (DuoAccessoryManager*) sharedManager;

@end

extern NSString* DuoAcessoryWasAddedNotification;
extern NSString* DuoAcessoryWasRemovedNotification;
extern NSString* DuoAccessoryObjectKey;
